﻿namespace ch05.binary
{
    public static class ConstData
    {
        public const uint FtTag = 0x60;
        public const uint FuncRef = 0x70;
        public const byte MutConst = 0;
        public const byte MutVar = 1;


        public const uint MagicNumber = 0x6D736100; // `\0asm`
        public const uint Version = 0x00000001; // 1

        public const byte ImportTagFunc = 0;
        public const byte ImportTagTable = 1;
        public const byte ImportTagMem = 2;
        public const byte ImportTagGlobal = 3;

        public const byte ExportTagFunc = 0;
        public const byte ExportTagTable = 1;
        public const byte ExportTagMem = 2;
        public const byte ExportTagGlobal = 3;


        public const byte SecCustomID = 0;
        public const byte SecTypeID = 1;
        public const byte SecImportID = 2;
        public const byte SecFuncID = 3;
        public const byte SecTableID = 4;
        public const byte SecMemID = 5;
        public const byte SecGlobalID = 6;
        public const byte SecExportID = 7;
        public const byte SecStartID = 8;
        public const byte SecElemID = 9;
        public const byte SecCodeID = 10;
        public const byte SecDataID = 11;
    }
}